package com.card.server.enums;

/**
 * @author TISNIW
 * @version 1.0
 * @date 2025/5/8 8:42
 * @desc
 */
public enum UserStatus {
    //在线
    ONLINE("在线"),
    //离线
    OFFLINE("离线"),
    //忙碌
    BUSY("忙碌"),
    //离开
    AWAY("离开"),
    //隐身
    HIDDEN("隐身");

    private final String name;

    UserStatus( String name) {
        this.name = name;
    }


    public String getName() {
        return name;
    }
    public static UserStatus getByName(String name) {
        for (UserStatus status : UserStatus.values()) {
            if (status.getName().equals(name)) {
                return status;
            }
        }
        return null;
    }
}
